//
//  DBAnimate.h
//  DragonBonesCPP
//
//  Created by DuanHongbo on 15/1/19.
//
//

#ifndef __DragonBonesCPP__DBAnimate__
#define __DragonBonesCPP__DBAnimate__

#include <stdio.h>
#include "cocos2d.h"
#include "CCArmatureDisplay.h"

USING_NS_CC;


DRAGONBONES_NAMESPACE_BEGIN
class DBAnimate : public ActionInterval
{
public:
    static DBAnimate* create(float duration,const std::string& aniName);
    
    
    //
    // Overrides
    //
    virtual DBAnimate* clone() const override;
    //virtual DBAnimate* reverse() const override;
    virtual void startWithTarget(Node *target) override;
    virtual void stop(void) override;
    virtual void update(float t) override;
    
protected:
    DBAnimate();
    virtual ~DBAnimate();
    
    bool init(float duration,const std::string& aniName);
protected:
    CCArmatureDisplay* _armatureNode;
    std::string _aniName;
};
DRAGONBONES_NAMESPACE_END


#endif /* defined(__DragonBonesCPP__DBAnimate__) */
